package com.bjpowernode.drp.util;

import java.util.List;

public class PageModel<T> {

	private int pageNo = 1;
	
	private int pageSize;
	
	private int totalPages;
	
	private List<T> list;

	public List<T> getList() {
		return list;
	}

	public void setList(List<T> list) {
		this.list = list;
	}

	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getTotalPages() {
		return totalPages;
	}

	public void setTotalPages(int totalPages) {
		this.totalPages = totalPages;
	}
	
	public int getTopPageNo(){
		return 1;
	}
	
	public int getBottomPageNo(){
		return totalPages;
	}
	
	public int getNextPageNo(){
		return pageNo==totalPages?totalPages:(pageNo+1);
	}
	
	public int getPreviousPageNo(){
		return pageNo==1?1:(pageNo-1);
	}
}
